#pragma once

#include "VContainer.h"
#include "VDataModule.h"


class VText;
class VPicture;

class VSingerNavigator :
    public VContainer
{
public:
    VSingerNavigator(void);
    ~VSingerNavigator(void);

protected:
    enum
    {
        LOAD_BUFFER_BOUND = 7
    };

public: // public interface
    void init();

protected:  //
    void initButtons();

public:
    void switchToTab(int tabid);
    int getCurrentTab();

public: // static callback
    static bool switchToSpecialTab(int, int, VWidget* triged);

public: // static interface
    static VSingerNavigator* getThis();

protected:  // static constants
    static const int default_res_x_start = 35,
                     default_res_x_width = 159 - default_res_x_start,
                     default_res_x_margin = 186 - default_res_x_width - default_res_x_start;
    static const int max_count = 8;

    static const int load_buffer = 9;

protected:  // protected variables
    int _currenttab;
    int _begin_ended, _end_ended;
    std::string _pinyin;
    int _type;

protected:
    void loadData();


public:
    static void initDefaultAvatar();
    static VPicture* getDefaultAvatar();
    static void initDefaultName();
    static VText* getDefatultName();

protected:
    static VSingerNavigator* _pthis;
    static VPicture* _defaultsinger;
    static VText* _defaultname;
};
